Body scan

ABSTRACT

A depth image of a scene may be received, observed, or captured by a device. The depth image may then be analyzed to determine whether the depth image includes a human target. For example, the depth image may include one or more targets including a human target and non-human targets. Each of the targets may be flood filled and compared to a pattern to determine whether the target may be a human target. If one or more of the targets in the depth image includes a human target, the human target may be scanned. A skeletal model of the human target may then be generated based on the scan.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 12/914,401filed Oct. 28, 2010, which is a continuation of application Ser. No.12/363,542 filed Jan. 30, 2009, now issued as U.S. Pat. No. 8,294,767,the contents of all of which are hereby incorporated by reference intheir entirety.

BACKGROUND

Many computing applications such as computer games, multimediaapplications, or the like use controls to allow users to manipulate gamecharacters or other aspects of an application. Typically such controlsare input using, for example, controllers, remotes, keyboards, mice, orthe like. Unfortunately, such controls can be difficult to learn, thuscreating a barrier between a user and such games and applications.Furthermore, such controls may be different than actual game actions orother application actions for which the controls are used. For example,a game control that causes a game character to swing a baseball bat maynot correspond to an actual motion of swinging the baseball bat.

SUMMARY

Disclosed herein are systems and methods for capturing depth informationof a scene that may be used to process a human input. For example, adepth image of a scene may be received or observed. The depth image maythen be analyzed to determine whether the depth image includes a humantarget. For example, the depth image may include one or more targetsincluding a human target and non-human targets. According to an exampleembodiment, portions of the depth image may be flood filled and comparedto a pattern to determine whether the target may be a human target. Ifone or more of the targets in the depth image includes a human target,the human target may be scanned. A model of the human target may then begenerated based on the scan.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter. Furthermore,the claimed subject matter is not limited to implementations that solveany or all disadvantages noted in any part of this disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The file of this patent or application contains at least onedrawing/photograph executed in color. Copies of this patent or patentapplication publication with color drawing(s)/photograph(s) will beprovided by the Office upon request and payment of the necessary fee.

FIGS. 1A and 1B illustrate an example embodiment of a targetrecognition, analysis, and tracking system with a user playing a game.

FIG. 2 illustrates an example embodiment of a capture device that may beused in a target recognition, analysis, and tracking system.

FIG. 3 illustrates an example embodiment of a computing environment thatmay be used to interpret one or more gestures in a target recognition,analysis, and tracking system.

FIG. 4 illustrates another example embodiment of a computing environmentthat may be used to interpret one or more gestures in a targetrecognition, analysis, and tracking system.

FIG. 5 depicts a flow diagram of an example method for scanning a targetthat may be visually tracked.

FIG. 6 illustrates an example embodiment of a depth image.

FIG. 7 illustrates an example embodiment of a depth image with a floodfilled human target.

FIG. 8 illustrates an example embodiment of a depth image with a floodfilled human target matched against a pattern.

FIG. 9 illustrates an example embodiment of a depth image a human targetbeing scanned to generate a model.

FIG. 10 illustrates an example embodiment of a skeletal modelrepresenting a scanned human target.

FIGS. 11A-11E illustrate an example embodiment of a joint being adjustedfor a skeletal model of a human target.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

As will be described herein, a user may control an application executingon a computing environment such as a game console, a computer, or thelike by performing one or more gestures. According to one embodiment,the gestures may be received by, for example, a capture device. Forexample, the capture device may capture a depth image of a scene. In oneembodiment, the capture device may determine whether one or more targetsor objects in the scene corresponds to a human target such as the user.To determine whether a target or object in the scene corresponds a humantarget, each of the targets, objects or any part of the scene may beflood filled and compared to a pattern of a human body model. Eachtarget or object that matches the pattern may then be scanned togenerate a model such as a skeletal model, a mesh human model, or thelike associated therewith. The model may then be provided to thecomputing environment such that the computing environment may track themodel, render an avatar associated with the model, determine clothing,skin and other colors based on a corresponding RGB image, and/ordetermine which controls to perform in an application executing on thecomputer environment based on, for example, the model.

FIGS. 1A and 1B illustrate an example embodiment of a configuration of atarget recognition, analysis, and tracking system 10 with a user 18playing a boxing game. In an example embodiment, the target recognition,analysis, and tracking system 10 may be used to recognize, analyze,and/or track a human target such as the user 18.

As shown in FIG. 1A, the target recognition, analysis, and trackingsystem 10 may include a computing environment 12. The computingenvironment 12 may be a computer, a gaming system or console, or thelike. According to an example embodiment, the computing environment 12may include hardware components and/or software components such that thecomputing environment 12 may be used to execute applications such asgaming applications, non-gaming applications, or the like.

As shown in FIG. 1A, the target recognition, analysis, and trackingsystem 10 may further include a capture device 20. The capture device 20may be, for example, a camera that may be used to visually monitor oneor more users, such as the user 18, such that gestures performed by theone or more users may be captured, analyzed, and tracked to perform oneor more controls or actions within an application, as will be describedin more detail below.

According to one embodiment, the target recognition, analysis, andtracking system 10 may be connected to an audiovisual device 16 such asa television, a monitor, a high-definition television (HDTV), or thelike that may provide game or application visuals and/or audio to a usersuch as the user 18. For example, the computing environment 12 mayinclude a video adapter such as a graphics card and/or an audio adaptersuch as a sound card that may provide audiovisual signals associatedwith the game application, non-game application, or the like. Theaudiovisual device 16 may receive the audiovisual signals from thecomputing environment 12 and may then output the game or applicationvisuals and/or audio associated with the audiovisual signals to the user18. According to one embodiment, the audiovisual device 16 may beconnected to the computing environment 12 via, for example, an S-Videocable, a coaxial cable, an HDMI cable, a DVI cable, a VGA cable, or thelike.

As shown in FIGS. 1A and 1B, the target recognition, analysis, andtracking system 10 may be used to recognize, analyze, and/or track ahuman target such as the user 18. For example, the user 18 may betracked using the capture device 20 such that the movements of user 18may be interpreted as controls that may be used to affect theapplication being executed by computer environment 12. Thus, accordingto one embodiment, the user 18 may move his or her body to control theapplication.

As shown in FIGS. 1A and 1B, in an example embodiment, the applicationexecuting on the computing environment 12 may be a boxing game that theuser 18 may be playing. For example, the computing environment 12 mayuse the audiovisual device 16 to provide a visual representation of aboxing opponent 22 to the user 18. The computing environment 12 may alsouse the audiovisual device 16 to provide a visual representation of aplayer avatar 24 that the user 18 may control with his or her movements.For example, as shown in FIG. 1B, the user 18 may throw a punch inphysical space to cause the player avatar 24 to throw a punch in gamespace. Thus, according to an example embodiment, the computerenvironment 12 and the capture device 20 of the target recognition,analysis, and tracking system 10 may be used to recognize and analyzethe punch of the user 18 in physical space such that the punch may beinterpreted as a game control of the player avatar 24 in game space.

Other movements by the user 18 may also be interpreted as other controlsor actions, such as controls to bob, weave, shuffle, block, jab, orthrow a variety of different power punches. Furthermore, some movementsmay be interpreted as controls that may correspond to actions other thancontrolling the player avatar 24. For example, the player may usemovements to end, pause, or save a game, select a level, view highscores, communicate with a friend, etc. Additionally, a full range ofmotion of the user 18 may be available, used, and analyzed in anysuitable manner to interact with an application.

In example embodiments, the human target such as the user 18 may have anobject. In such embodiments, the user of an electronic game may beholding the object such that the motions of the player and the objectmay be used to adjust and/or control parameters of the game. Forexample, the motion of a player holding a racket may be tracked andutilized for controlling an on-screen racket in an electronic sportsgame. In another example embodiment, the motion of a player holding anobject may be tracked and utilized for controlling an on-screen weaponin an electronic combat game.

According to other example embodiments, the target recognition,analysis, and tracking system 10 may further be used to interpret targetmovements as operating system and/or application controls that areoutside the realm of games. For example, virtually any controllableaspect of an operating system and/or application may be controlled bymovements of the target such as the user 18.

FIG. 2 illustrates an example embodiment of the capture device 20 thatmay be used in the target recognition, analysis, and tracking system 10.According to an example embodiment, the capture device 20 may beconfigured to capture video with depth information including a depthimage that may include depth values via any suitable techniqueincluding, for example, time-of-flight, structured light, stereo image,or the like. According to one embodiment, the capture device 20 mayorganize the calculated depth information into “Z layers,” or layersthat may be perpendicular to a Z axis extending from the depth cameraalong its line of sight.

As shown in FIG. 2, the capture device 20 may include an image cameracomponent 22. According to an example embodiment, the image cameracomponent 22 may be a depth camera that may capture the depth image of ascene. The depth image may include a two-dimensional (2-D) pixel area ofthe captured scene where each pixel in the 2-D pixel area may representa depth value such as a length or distance in, for example, centimeters,millimeters, or the like of an object in the captured scene from thecamera.

As shown in FIG. 2, according to an example embodiment, the image cameracomponent 22 may include an IR light component 24, a three-dimensional(3-D) camera 26, and an RGB camera 28 that may be used to capture thedepth image of a scene. For example, in time-of-flight analysis, the IRlight component 24 of the capture device 20 may emit an infrared lightonto the scene and may then use sensors (not shown) to detect thebackscattered light from the surface of one or more targets and objectsin the scene using, for example, the 3-D camera 26 and/or the RGB camera28. In some embodiments, pulsed infrared light may be used such that thetime between an outgoing light pulse and a corresponding incoming lightpulse may be measured and used to determine a physical distance from thecapture device 20 to a particular location on the targets or objects inthe scene. Additionally, in other example embodiments, the phase of theoutgoing light wave may be compared to the phase of the incoming lightwave to determine a phase shift. The phase shift may then be used todetermine a physical distance from the capture device to a particularlocation on the targets or objects.

According to another example embodiment, time-of-flight analysis may beused to indirectly determine a physical distance from the capture device20 to a particular location on the targets or objects by analyzing theintensity of the reflected beam of light over time via varioustechniques including, for example, shuttered light pulse imaging.

In another example embodiment, the capture device 20 may use astructured light to capture depth information. In such an analysis,patterned light (i.e., light displayed as a known pattern such as gridpattern or a stripe pattern) may be projected onto the scene via, forexample, the IR light component 24. Upon striking the surface of one ormore targets or objects in the scene, the pattern may become deformed inresponse. Such a deformation of the pattern may be captured by, forexample, the 3-D camera 26 and/or the RGB camera 28 and may then beanalyzed to determine a physical distance from the capture device to aparticular location on the targets or objects.

According to another embodiment, the capture device 20 may include twoor more physically separated cameras that may view a scene fromdifferent angles, to obtain visual stereo data that may be resolved togenerate depth information

The capture device 20 may further include a microphone 30. Themicrophone 30 may include a transducer or sensor that may receive andconvert sound into an electrical signal. According to one embodiment,the microphone 30 may be used to reduce feedback between the capturedevice 20 and the computing environment 12 in the target recognition,analysis, and tracking system 10. Additionally, the microphone 30 may beused to receive audio signals that may also be provided by the user tocontrol applications such as game applications, non-game applications,or the like that may be executed by the computing environment 12.

In an example embodiment, the capture device 20 may further include aprocessor 32 that may be in operative communication with the imagecamera component 22. The processor 32 may include a standardizedprocessor, a specialized processor, a microprocessor, or the like thatmay execute instructions that may include instructions for receiving thedepth image, determining whether a suitable target may be included inthe depth image, converting the suitable target into a skeletalrepresentation or model of the target, or any other suitableinstruction.

The capture device 20 may further include a memory component 34 that maystore the instructions that may be executed by the processor 32, imagesor frames of images captured by the 3-D camera or RGB camera, or anyother suitable information, images, or the like. According to an exampleembodiment, the memory component 34 may include random access memory(RAM), read only memory (ROM), cache, Flash memory, a hard disk, or anyother suitable storage component. As shown in FIG. 2, in one embodiment,the memory component 34 may be a separate component in communicationwith the image capture component 22 and the processor 32. According toanother embodiment, the memory component 34 may be integrated into theprocessor 32 and/or the image capture component 22.

As shown in FIG. 2, the capture device 20 may be in communication withthe computing environment 12 via a communication link 36. Thecommunication link 36 may be a wired connection including, for example,a USB connection, a Firewire connection, an Ethernet cable connection,or the like and/or a wireless connection such as a wireless 802.11b, g,a, or n connection. According to one embodiment, the computingenvironment 12 may provide a clock to the capture device 20 that may beused to determine when to capture, for example, a scene via thecommunication link 36.

Additionally, the capture device 20 may provide the depth informationand images captured by, for example, the 3-D camera 26 and/or the RGBcamera 28, and a skeletal model that may be generated by the capturedevice 20 to the computing environment 12 via the communication link 36.The computing environment 12 may then use the skeletal model, depthinformation, and captured images to, for example, control an applicationsuch as a game or word processor. For example, as shown, in FIG. 2, thecomputing environment 12 may include a gestures library 190. Thegestures library 190 may include a collection of gesture filters, eachcomprising information concerning a gesture that may be performed by theskeletal model (as the user moves). The data captured by the cameras 26,28 and device 20 in the form of the skeletal model and movementsassociated with it may be compared to the gesture filters in the gesturelibrary 190 to identify when a user (as represented by the skeletalmodel) has performed one or more gestures. Those gestures may beassociated with various controls of an application. Thus, the computingenvironment 12 may use the gestures library 190 to interpret movementsof the skeletal model and to control an application based on themovements.

FIG. 3 illustrates an example embodiment of a computing environment thatmay be used to interpret one or more gestures in a target recognition,analysis, and tracking system. The computing environment such as thecomputing environment 12 described above with respect to FIGS. 1A-2 maybe a multimedia console 100, such as a gaming console. As shown in FIG.3, the multimedia console 100 has a central processing unit (CPU) 101having a level 1 cache 102, a level 2 cache 104, and a flash ROM (ReadOnly Memory) 106. The level 1 cache 102 and a level 2 cache 104temporarily store data and hence reduce the number of memory accesscycles, thereby improving processing speed and throughput. The CPU 101may be provided having more than one core, and thus, additional level 1and level 2 caches 102 and 104. The flash ROM 106 may store executablecode that is loaded during an initial phase of a boot process when themultimedia console 100 is powered ON.

A graphics processing unit (GPU) 108 and a video encoder/video codec(coder/decoder) 114 form a video processing pipeline for high speed andhigh resolution graphics processing. Data is carried from the graphicsprocessing unit 108 to the video encoder/video codec 114 via a bus. Thevideo processing pipeline outputs data to an A/V (audio/video) port 140for transmission to a television or other display. A memory controller110 is connected to the GPU 108 to facilitate processor access tovarious types of memory 112, such as, but not limited to, a RAM (RandomAccess Memory).

The multimedia console 100 includes an I/O controller 120, a systemmanagement controller 122, an audio processing unit 123, a networkinterface controller 124, a first USB host controller 126, a second USBcontroller 128 and a front panel I/O subassembly 130 that are preferablyimplemented on a module 118. The USB controllers 126 and 128 serve ashosts for peripheral controllers 142(1)-142(2), a wireless adapter 148,and an external memory device 146 (e.g., flash memory, external CD/DVDROM drive, removable media, etc.). The network interface 124 and/orwireless adapter 148 provide access to a network (e.g., the Internet,home network, etc.) and may be any of a wide variety of various wired orwireless adapter components including an Ethernet card, a modem, aBluetooth module, a cable modem, and the like.

System memory 143 is provided to store application data that is loadedduring the boot process. A media drive 144 is provided and may comprisea DVD/CD drive, hard drive, or other removable media drive, etc. Themedia drive 144 may be internal or external to the multimedia console100. Application data may be accessed via the media drive 144 forexecution, playback, etc. by the multimedia console 100. The media drive144 is connected to the I/O controller 120 via a bus, such as a SerialATA bus or other high speed connection (e.g., IEEE 1394).

The system management controller 122 provides a variety of servicefunctions related to assuring availability of the multimedia console100. The audio processing unit 123 and an audio codec 132 form acorresponding audio processing pipeline with high fidelity and stereoprocessing. Audio data is carried between the audio processing unit 123and the audio codec 132 via a communication link. The audio processingpipeline outputs data to the A/V port 140 for reproduction by anexternal audio player or device having audio capabilities.

The front panel I/O subassembly 130 supports the functionality of thepower button 150 and the eject button 152, as well as any LEDs (lightemitting diodes) or other indicators exposed on the outer surface of themultimedia console 100. A system power supply module 136 provides powerto the components of the multimedia console 100. A fan 138 cools thecircuitry within the multimedia console 100.

The CPU 101, GPU 108, memory controller 110, and various othercomponents within the multimedia console 100 are interconnected via oneor more buses, including serial and parallel buses, a memory bus, aperipheral bus, and a processor or local bus using any of a variety ofbus architectures. By way of example, such architectures can include aPeripheral Component Interconnects (PCI) bus, PCI-Express bus, etc.

When the multimedia console 100 is powered ON, application data may beloaded from the system memory 143 into memory 112 and/or caches 102, 104and executed on the CPU 101. The application may present a graphicaluser interface that provides a consistent user experience whennavigating to different media types available on the multimedia console100. In operation, applications and/or other media contained within themedia drive 144 may be launched or played from the media drive 144 toprovide additional functionalities to the multimedia console 100.

The multimedia console 100 may be operated as a standalone system bysimply connecting the system to a television or other display. In thisstandalone mode, the multimedia console 100 allows one or more users tointeract with the system, watch movies, or listen to music. However,with the integration of broadband connectivity made available throughthe network interface 124 or the wireless adapter 148, the multimediaconsole 100 may further be operated as a participant in a larger networkcommunity.

When the multimedia console 100 is powered ON, a set amount of hardwareresources are reserved for system use by the multimedia consoleoperating system. These resources may include a reservation of memory(e.g., 16 MB), CPU and GPU cycles (e.g., 5%), networking bandwidth(e.g., 8 kbs), etc. Because these resources are reserved at system boottime, the reserved resources do not exist from the application's view.

In particular, the memory reservation preferably is large enough tocontain the launch kernel, concurrent system applications and drivers.The CPU reservation is preferably constant such that if the reserved CPUusage is not used by the system applications, an idle thread willconsume any unused cycles.

With regard to the GPU reservation, lightweight messages generated bythe system applications (e.g., popups) are displayed by using a GPUinterrupt to schedule code to render popup into an overlay. The amountof memory required for an overlay depends on the overlay area size andthe overlay preferably scales with screen resolution. Where a full userinterface is used by the concurrent system application, it is preferableto use a resolution independent of application resolution. A scaler maybe used to set this resolution such that the need to change frequencyand cause a TV resynch is eliminated.

After the multimedia console 100 boots and system resources arereserved, concurrent system applications execute to provide systemfunctionalities. The system functionalities are encapsulated in a set ofsystem applications that execute within the reserved system resourcesdescribed above. The operating system kernel identifies threads that aresystem application threads versus gaming application threads. The systemapplications are preferably scheduled to run on the CPU 101 atpredetermined times and intervals in order to provide a consistentsystem resource view to the application. The scheduling is to minimizecache disruption for the gaming application running on the console.

When a concurrent system application requires audio, audio processing isscheduled asynchronously to the gaming application due to timesensitivity. A multimedia console application manager (described below)controls the gaming application audio level (e.g., mute, attenuate) whensystem applications are active.

Input devices (e.g., controllers 142(1) and 142(2)) are shared by gamingapplications and system applications. The input devices are not reservedresources, but are to be switched between system applications and thegaming application such that each will have a focus of the device. Theapplication manager preferably controls the switching of input stream,without knowledge the gaming application's knowledge and a drivermaintains state information regarding focus switches. The cameras 26, 28and capture device 20 may define additionl input devices for the console100.

FIG. 4 illustrates another example embodiment of a computing environment220 that may be the computing environment 12 shown in FIGS. 1A-2 used tointerpret one or more gestures in a target recognition, analysis, andtracking system. The computing system environment 220 is only oneexample of a suitable computing environment and is not intended tosuggest any limitation as to the scope of use or functionality of thepresently disclosed subject matter. Neither should the computingenvironment 220 be interpreted as having any dependency or requirementrelating to any one or combination of components illustrated in theexemplary operating environment 220. In some embodiments the variousdepicted computing elements may include circuitry configured toinstantiate specific aspects of the present disclosure. For example, theterm circuitry used in the disclosure can include specialized hardwarecomponents configured to perform function(s) by firmware or switches. Inother examples embodiments the term circuitry can include a generalpurpose processing unit, memory, etc., configured by softwareinstructions that embody logic operable to perform function(s). Inexample embodiments where circuitry includes a combination of hardwareand software, an implementer may write source code embodying logic andthe source code can be compiled into machine readable code that can beprocessed by the general purpose processing unit. Since one skilled inthe art can appreciate that the state of the art has evolved to a pointwhere there is little difference between hardware, software, or acombination of hardware/software, the selection of hardware versussoftware to effectuate specific functions is a design choice left to animplementer. More specifically, one of skill in the art can appreciatethat a software process can be transformed into an equivalent hardwarestructure, and a hardware structure can itself be transformed into anequivalent software process. Thus, the selection of a hardwareimplementation versus a software implementation is one of design choiceand left to the implementer.

In FIG. 4, the computing environment 220 comprises a computer 241, whichtypically includes a variety of computer readable media. Computerreadable media can be any available media that can be accessed bycomputer 241 and includes both volatile and nonvolatile media, removableand non-removable media. The system memory 222 includes computer storagemedia in the form of volatile and/or nonvolatile memory such as readonly memory (ROM) 223 and random access memory (RAM) 260. A basicinput/output system 224 (BIOS), containing the basic routines that helpto transfer information between elements within computer 241, such asduring start-up, is typically stored in ROM 223. RAM 260 typicallycontains data and/or program modules that are immediately accessible toand/or presently being operated on by processing unit 259. By way ofexample, and not limitation, FIG. 4 illustrates operating system 225,application programs 226, other program modules 227, and program data228.

The computer 241 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 4 illustrates a hard disk drive 238 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 239that reads from or writes to a removable, nonvolatile magnetic disk 254,and an optical disk drive 240 that reads from or writes to a removable,nonvolatile optical disk 253 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 238 is typically connectedto the system bus 221 through an non-removable memory interface such asinterface 234, and magnetic disk drive 239 and optical disk drive 240are typically connected to the system bus 221 by a removable memoryinterface, such as interface 235.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 4, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 241. In FIG. 4, for example, hard disk drive 238 is illustratedas storing operating system 258, application programs 257, other programmodules 256, and program data 255. Note that these components can eitherbe the same as or different from operating system 225, applicationprograms 226, other program modules 227, and program data 228. Operatingsystem 258, application programs 257, other program modules 256, andprogram data 255 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 241 through input devices such as akeyboard 251 and pointing device 252, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit259 through a user input interface 236 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). The cameras26, 28 and capture device 20 may define additional input devices for theconsole 100. A monitor 242 or other type of display device is alsoconnected to the system bus 221 via an interface, such as a videointerface 232. In addition to the monitor, computers may also includeother peripheral output devices such as speakers 244 and printer 243,which may be connected through a output peripheral interface 233.

The computer 241 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer246. The remote computer 246 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 241, although only a memory storage device 247 has beenillustrated in FIG. 4. The logical connections depicted in FIG. 2include a local area network (LAN) 245 and a wide area network (WAN)249, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the computer 241 is connectedto the LAN 245 through a network interface or adapter 237. When used ina WAN networking environment, the computer 241 typically includes amodem 250 or other means for establishing communications over the WAN249, such as the Internet. The modem 250, which may be internal orexternal, may be connected to the system bus 221 via the user inputinterface 236, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 241, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 4 illustrates remoteapplication programs 248 as residing on memory device 247. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

FIG. 5 depicts a flow diagram of an example method 300 for scanning atarget that may be visually tracked. The example method 300 may beimplemented using, for example, the capture device 20 and/or thecomputing environment 12 of the target recognition, analysis, andtracking system 10 described with respect to FIGS. 1A-4. According to anexample embodiment, the target may be a human target, a human targetwith an object, two or more human targets, or the like that may bescanned to generate a model such as a skeletal model, a mesh humanmodel, or any other suitable representation thereof. The model may thenbe used to interact with an application that may be executed by thecomputing environment 12 described above with respect to FIGS. 1A-1B.According to an example embodiment, the target may be scanned togenerate the model when an application may be started or launched on,for example, the computing environment 12 and/or periodically duringexecution of the application on, for example, the computing environment12.

For example, as described above, the target may include the user 18described above with respect to FIGS. 1A-1B. The target may be scannedto generate a skeletal model of, for example, the user 18 that may betracked such that physical movements or motions of the user 18 may actas a real-time user interface that adjusts and/or controls parameters ofan application such as an electronic game. For example, the trackedmotions of a user may be used to move an on-screen character or avatarin an electronic role-playing game; to control an on-screen vehicle inan electronic racing game; to control the building or organization ofobjects in a virtual environment; or to perform any other suitablecontrols of an application.

According to one embodiment, at 305, depth information may be received.For example, the target recognition, analysis, and tracking system mayinclude a capture device such as the capture device 20 described abovewith respect to FIGS. 1A-2. The capture device may capture or observe ascene that may include one or more targets. In an example embodiment,the capture device may be a depth camera configured to obtain depthinformation associated with the one or more targets in the scene usingany suitable technique such as time-of-flight analysis, structured lightanalysis, stereo vision analysis, or the like.

According to an example embodiment, the depth information may include adepth image. The depth image may be a plurality of observed pixels whereeach observed pixel has an observed depth value. For example, the depthimage may include a two-dimensional (2-D) pixel area of the capturedscene where each pixel in the 2-D pixel area may represent a depth valuesuch as a length or distance in, for example, centimeters, millimeters,or the like of an object in the captured scene from the capture device.

FIG. 6 illustrates an example embodiment of a depth image 400 that maybe received at 305. According to an example embodiment, the depth image400 may be an image or frame of a scene captured by, for example, the3-D camera 26 and/or the RGB camera 28 of the capture device 20described above with respect to FIG. 2. As shown in FIG. 6, the depthimage 400 may include a human target 402 and one or more non-humantargets 404 such as a wall, a table, a monitor, or the like in thecaptured scene. As described above, the depth image 400 may include aplurality of observed pixels where each observed pixel has an observeddepth value associated therewith. For example, the depth image 400 mayinclude a two-dimensional (2-D) pixel area of the captured scene whereeach pixel in the 2-D pixel area may represent a depth value such as alength or distance in, for example, centimeters, millimeters, or thelike of a target or object in the captured scene from the capturedevice. In one example embodiment, the depth image 400 may be colorizedsuch that different colors of the pixels of the depth image correspondto different distances of the human target 402 and non-human targets 404from the capture device. For example, according to one embodiment, thepixels associated with a target closest to the capture device may becolored with shades of red and/or orange in the depth image whereas thepixels associated with a target further away may be colored with shadesof green and/or blue in the depth image.

Referring back to FIG. 3, in one embodiment, upon receiving the depthimage with, for example, the depth information at 305, the depth imagemay be downsampled to a lower processing resolution such that the depthimage may be more easily used and/or more quickly processed with lesscomputing overhead. Additionally, one or more high-variance and/or noisydepth values may be removed and/or smoothed from the depth image;portions of missing and/or removed depth information may be filled inand/or reconstructed; and/or any other suitable processing may beperformed on the received depth information may such that the depthinformation may used to generate a model such as a skeletal model, whichwill be described in more detail below.

At 310, the target recognition, analysis, and tracking system maydetermine whether the depth image includes a human target. For example,at 310, each target or object in the depth image may be flood filled andcompared to a pattern to determine whether the depth image includes ahuman target.

FIG. 7 illustrates an example embodiment of the depth image 400 with thehuman target 402 flood filled. According to one embodiment, uponreceiving the depth image 400, each target in the depth image 400 may beflood filled. For example, in one embodiment, the edges of each targetsuch as the human target 402 and the non-human targets 404 in thecaptured scene of the depth image 400 may be determined. As describedabove, the depth image 400 may include a two-dimensional (2-D) pixelarea of the captured scene where each pixel in the 2-D pixel area mayrepresent a depth value such as a length or distance in, for example,centimeters, millimeters, or the like of an object in the captured scenefrom the camera. According to an example embodiment, the edges may bedetermined by comparing various depth values associated with, forexample, adjacent or nearby pixels of the depth image 400. If thevarious depth values being compared may be greater than a predeterminededge tolerance, the pixels may define an edge. In one embodiment, thepredetermined edge tolerance may be, for example, a 100 millimeters. Ifa pixel representing a depth value of 1000 millimeters may be comparedwith an adjacent pixel representing a depth value of 1200 millimeters,the pixels may define an edge of a target, because the difference in thelength or distance between the pixels is greater than the predeterminededge tolerance of 100 mm.

Additionally, as described above, the capture device may organize thecalculated depth information including the depth image into “Z layers,”or layers that may be perpendicular to a Z axis extending from thecamera along its line of sight to the viewer. The likely Z values of theZ layers may be flood filled based on the determined edges. For example,the pixels associated with the determined edges and the pixels of thearea within the determined edges may be associated with each other todefine a target or an object in the scene that may be compared with apattern, which will be described in more detail below

According to another embodiment, upon receiving the depth image 400,predetermined points or areas on the depth image 400 may be flood filledto determine whether the depth image 400 includes the human target 402.For example, various depth values of pixels in a selected area or pointof the depth image 400 may be compared to determine edges that maydefine targets or objects as described above. The likely Z values of theZ layers may be flood filled based on the determined edges. For example,the pixels associated with the determined edges and the pixels of thearea within the edges may be associated with each other to define atarget or an object in the scene that may be compared with a pattern,which will be described in more detail below.

In an example embodiment, the predetermined points or areas may beevenly distributed across the depth image. For example, thepredetermined points or areas may include a point or an area in thecenter of the depth image, two points or areas in between the left edgeand the center of the depth image, two points or areas between the rightedge and the center of the depth image, or the like.

FIG. 8 illustrates an example embodiment of a depth image such as thedepth image 400 with the flood filled human target 402 matched against apattern. According to an example embodiment, each of the flood filledtargets such as the human target 402 and the non-human targets 404 maybe matched against a pattern to determine whether and/or which of thetargets in the scene include a human. The pattern may include, forexample, a machine representation of a predetermined body modelassociated with a human in various positions or poses such as a typicalstanding pose with arms to each side.

According to an example embodiment, the pattern may include one or moredata structures that may have a set of variables that collectivelydefine a typical body of a human such that the information associatedwith the pixels of, for example, the human target 402 and the non-humantargets 404 may be compared with the variables to determine whether andwhich of the targets may be a human. In one embodiment, each of thevariables in the set may be weighted based on a body part. For example,various body parts such as a head and/or shoulders in the pattern mayhave weight value associated therewith that may be greater than otherbody parts such as a leg. According to one embodiment, the weight valuesmay be used when comparing a target such as the human target 402 and thenon-human targets 404 with the variables to determine whether and whichof the targets may be human. For example, matches between the variablesand the target that have larger weight values may yield a greaterlikelihood of the target being human than matches with smaller weightvalues.

Additionally, in an example embodiment, a confidence value may becalculated that indicates, for example, the accuracy to which each ofthe flood filled targets in the depth image 400 corresponds to thepattern. The confidence value may include a probability that each of theflood filled targets may be a human. According to one embodiment, theconfidence value may be used to further determine whether the floodfilled target may be a human. For example, the confidence value maycompared to a threshold value such that if the confidence value exceedsthe threshold, the flood filled target associated therewith may bedetermined to be a human target.

Referring back to FIG. 3, at 315, if the depth image does not include ahuman target, a new depth image of a scene may be received at 305 suchthat the target recognition, analysis, and tracking system may determinewhether the new depth image may include a human target at 310.

At 315, if the depth image includes a human target, the human target maybe scanned for one or more body parts at 320. According to oneembodiment, the human target may be scanned to provide measurements suchas length, width, or the like associated with one or more body parts ofa user such as the user 18 described above with respect to FIGS. 1A and1B such that an accurate model of the user may be generated based onsuch measurements, which will be described in more detail below.

In an example embodiment, the human target may be isolated and a bitmaskof the human target may be created to scan for one or more body parts.The bitmask may be created by, for example, flood filling the humantarget such that the human target may be separated from other targets orobjects in the scene elements. The bitmask may then be analyzed for oneor more body parts to generate a model such as a skeletal model, a meshhuman model, or the like of the human target.

FIG. 9 illustrates an example embodiment of a depth image 400 thatincludes a human target 402 being scanned to generate a model. Forexample, after a valid human target such as the human target 402 may befound within the depth image 400, the background or the area of thedepth image not matching the human target may be removed. A bitmask maythen be generated for the human target 402 that may include values ofthe human target along, for example, an X, Y, and Z axis. According toan example embodiment, the bitmask of the human target 402 may bescanned for various body parts, starting with, for example, the head togenerate a skeletal model of the human target 402.

As shown in FIG. 9, the information such as the bits, pixels, or thelike associated with the matched human target 402 may be scanned todetermine various locations such as scan by 1-scan bp6 that areassociated with various parts of the body of the human target 402. Forexample, after removing the background or area surrounding the humantarget 402 in the depth image, the depth image 400 may include the humantarget 402 isolated. The bitmask that may include X, Y, and Z values maythen be generated for the isolated human target 402. The bitmask of thehuman target 402 may be scanned to determine various body parts. Forexample, a top of the bitmask of the human target 402 may initially bedetermined. As shown in FIG. 9, the top of the bitmask of the humantarget 402 may be associated with a location of the top of the head asindicated by scan bp1. After determining the top of the head, thebitmask may be scanned downward to then determine a location of a neckof the human target 402, a location of the shoulders of the human target402, or the like.

According to an example embodiment, to determine the location of theneck, shoulders, or the like of the human target 402, a width of thebitmask, for example, at a position being scanned, may be compared to athreshold value of a typical width associated with, for example, a neck,shoulders, or the like. In an alternative embodiment, the distance froma previous position scanned and associated with a body part in a bitmaskmay be used to determine the location of the neck, shoulders or thelike.

In one embodiment, to determine the location of the shoulders, the widthof the bitmask at the position indicated by scan bp3 in FIG. 9 may becompared to a threshold shoulder value. For example, a distance betweenthe two outer most Y values at the X value of the bitmask at theposition indicated by scan bp3 in FIG. 9 may be compared to thethreshold shoulder value of a typical distance between, for example,shoulders of a human. Thus, according to an example embodiment, thethreshold shoulder value may be a typical width or range of widthsassociated with shoulders of a body model of a human.

In another embodiment, to determine the location of the shoulders, thebitmask may be parsed downward a certain distance from the head. Forexample, the top of the bitmask that may be associated with the top ofthe head may have an X value associated therewith. A stored valueassociated with the typical distance from the top of the head to the topof the shoulders of a human body may then added to the X value of thetop of the head to determine the X value of the shoulders. Thus, in oneembodiment, a stored value may be added to the X value associated withscan bp1 shown in FIG. 9 to determine the X value associated with theshoulders at scan bp3.

In one embodiment, some body parts such as legs, feet, or the like maybe calculated based on, for example, the location of other body parts.For example, as described above, the information such as the bits,pixels, or the like associated with the human target 402 may be scannedto determine the locations of various body parts of the human target 402represented by scan bp1-scan bp6 in FIG. 9. Based on such locations,subsequent body parts such as legs, feet, or the like may then becalculated for the human target 402.

According to an example embodiment, upon determining the values of, forexample, a body part, a data structure may be created that may includemeasurement values such as length, width, or the like of the body partassociated with the scan of the bitmask of the human target 402. In oneembodiment, the data structure may include scan results averaged from aplurality depth images. For example, the capture device such as thecapture device 20 described above with respect to FIGS. 1A-2 may capturea scene in frames. Each frame may include a depth image. The depth imageof each frame may be analyzed to determine whether a human target may beincluded as described above. If the depth image of a frame includes ahuman target, a bitmask of the human target of the depth imageassociated with the frame may be scanned for one or more body parts at320. The determined value of a body part for each frame may then beaveraged such that the data structure may include average measurementvalues such as length, width, or the like of the body part associatedwith the scans of each frame. According another embodiment, themeasurement values of the determined body parts may be adjusted such asscaled up, scaled down, or the like such that measurements values in thedata structure more closely correspond to a typical model of a humanbody.

Referring back to FIG. 3, at 325, a model of the human target may thenbe generated based on the scan. For example, according to oneembodiment, measurement values determined by the scanned bitmask may beused to define one or more joints in a skeletal model. The one or morejoints may be used to define one or more bones that may correspond to abody part of a human.

FIG. 10 illustrates an example embodiment of a skeletal model 500representing a scanned human target. According to an example embodiment,the skeletal model 500 may include one or more data structures that mayrepresent, for example, the human target 402 described above withrespect to FIGS. 6-9 as a three-dimensional model. Each body part may becharacterized as a mathematical vector defining joints and bones of theskeletal model 500.

As shown in FIG. 10, the skeletal model 500 may include one or morejoints j1-j18. According to an example embodiment, each of the jointsj1-j18 may enable one or more body parts defined there between to moverelative to one or more other body parts. For example, a modelrepresenting a human target may include a plurality of rigid and/ordeformable body parts that may be defined by one or more structuralmembers such as “bones” with the joints j1-j18 located at theintersection of adjacent bones. The joints j1-18 may enable various bodyparts associated with the bones and joints j1-j18 to move independentlyof each other. For example, the bone defined between the joints j7 andj11, shown in FIG. 10, corresponds to a forearm that may be movedindependent of, for example, the bone defined between joints j15 and j17that corresponds to a calf.

FIGS. 11A-11E illustrate an example embodiment of a joint being adjustedto generate the skeletal model 500 of the human target 402 describedabove with respect to FIGS. 9-10. According to an example embodimentshown in FIG. 11A, the initial scan of the bitmask may render a jointj4′ that represents the left shoulder joint. As shown in FIG. 11A, thejoint j4′ may not accurately represent a typical location of a leftshoulder joint of a human. The joint j4′ may then be adjusted such thatthe joint may be repositioned along, for example, the X, Y, and Z axisto more accurately represent the typical location of a left shoulderjoint of a human as shown by the joint j4 in FIG. 11E.

According to an example embodiment, to reposition the joint j4′, a dYvalue associated with the distance between a reference point of the topof the scanned shoulder of the human target 402 and the joint j4′ may becompared to a dX value associated with the distance between a referencepoint of the edge of the human target 402 and the joint j4′. If the dYvalue may be greater than the dX value, the joint j4′ may be moved in afirst direction such as up the Y axis by the dX value to generate a newleft shoulder joint, represented by the joint j4″ in FIG. 11B.Alternatively, if the dX value may be greater than the dY value, thejoint j4′ may be moved in a second direction such as right along the Xaxis by the dY value.

According to one embodiment, the joint j4′ may be repositioned to rendersubsequent joints j4″ and j4′″ shown in FIGS. 11B and 11C until therepositioned joints may have an s value that may be within a range of atypical length of, for example, the shoulder blade to the joint as shownby the joint j4 in FIG. 11E. For example, as described above, the jointj4′ may be moved up along the Y axis by the dX value to generate thejoint j4″ in FIG. 11B. The dX and dY values of the joint j4″ may then becompared. If the dY value is greater than the dX value, the joint j4″may be moved up along the Y axis by the dX value. Alternatively, if thedX value is greater than the dY value, the joint j4″ may be moved to theright along the X axis by the dY value to generate another new leftshoulder joint, represented by the joint j4′″ in FIG. 11C. In an exampleembodiment, the joint j4′″ may then be adjusted as described above togenerate another new left shoulder joint such that subsequent new leftshoulder joints may be generated and adjusted until, for example. the dXand dY values of one of the new left shoulder joints may be equivalentor within a defined shoulder tolerance as represented by the joint j4″″in FIG. 11D. According to an example embodiment the joint j4″″ may thenbe moved toward the shoulder edge or away from the shoulder edge at, forexample, an angle such as a 45 degree angle to generate the joint j4shown in FIG. 11E that includes an s value within the range of a typicallength of, for example, the shoulder blade to the joint.

Thus, according to an example embodiment, one or more joints may beadjusted until such joints may be within a range of typical distancesbetween a joint and a body part of a human to generate a more accurateskeletal model. According to another embodiment, the model may furtherbe adjusted based on, for example, a height associated with the receivedhuman target to generate a more accurate skeletal model. For example,the joints and bones may be repositioned or scaled based on the heightassociated with the received human target.

At 330, the model may then be tracked. For example, according to anexample embodiment, the skeletal model such as the skeletal model 500described above with respect to FIG. 9 may be as a representation of auser such as the user 18 described above with respect to FIGS. 1A and1B. As the user moves in physical space, information from a capturedevice such as the capture device 20 described above with respect toFIGS. 1A and 1B may be used to adjust the skeletal model such that theskeletal model may accurately represent the user. In particular, one ormore forces may be applied to one or more force-receiving aspects of theskeletal model to adjust the skeletal model into a pose that moreclosely corresponds to the pose of the human target in physical space.

In one embodiment, as described above, the skeletal model may begenerated by the capture device. The skeletal model including anyinformation associated with adjustments that may need to be made theretomay be provided to a computing environment such as the computingenvironment 12 described above with respect to FIGS. 1A-4. The computingenvironment may include a gestures library that may be used to determinecontrols to perform within an application based on positions of variousbody parts in the skeletal model.

The visual appearance of an on-screen character may then be changed inresponse to changes to the skeletal model being tracked. For example, auser such as the user 18 described above with respect to FIGS. 1A and 1Bplaying an electronic game on a gaming console may be tracked by thegaming console as described herein. In particular, a body model such asa skeletal model may be used to model the target game player, and thebody model may be used to render an on-screen player avatar. As the gameplayer straightens one arm, the gaming console may track this motion,then in response to the tracked motion, adjust the body modelaccordingly. The gaming console may also apply one or more constraintsto movements of the body model. Upon making such adjustments andapplying such constraints, the gaming console may display the adjustedplayer avatar.

It should be understood that the configurations and/or approachesdescribed herein are exemplary in nature, and that these specificembodiments or examples are not to be considered limiting. The specificroutines or methods described herein may represent one or more of anynumber of processing strategies. As such, various acts illustrated maybe performed in the sequence illustrated, in other sequences, inparallel, or the like. Likewise, the order of the above-describedprocesses may be changed.

The subject matter of the present disclosure includes all novel andnonobvious combinations and subcombinations of the various processes,systems and configurations, and other features, functions, acts, and/orproperties disclosed herein, as well as any and all equivalents thereof.

What is claimed:
 1. A method for scanning a target in a captured scene:receiving an image of the scene, the image including the target;comparing the target with a pattern to determine that the target matchesthe pattern; repositioning at least a first joint if a distance betweenthe at least first joint and a reference point is greater than a valueuntil a position of the at least first joint is within a tolerancedefined for the at least first joint; and generating a model of thetarget based at least on the repositioned at least first joint.
 2. Themethod of claim 1, wherein the pattern includes a machine representationof a predetermined body model associated with a human.
 3. The method ofclaim 1, wherein comparing the target with the pattern to determine thatthe target matches the pattern further comprises calculating aconfidence value that indicates an accuracy to which the targetcorresponds to the pattern.
 4. The method of claim 1, furthercomprising: scanning the target to locate the at least first joint; andidentifying the reference point from the scan.
 5. The method of claim 4,wherein scanning the target further comprises: removing an area of theimage not matching the target; creating a bitmask of the target; andscanning the bitmask to determine various body parts of the target. 6.The method of claim 1, further comprising providing the model to acomputing system, wherein the computing system tracks one or moremovements of the model, and wherein the computing system is controlledbased on the tracked one or more movements.
 7. A device for capturingdepth information of a scene, the device comprising: a processor,wherein the processor is operable to execute computer executableinstructions, and wherein the computer executable instructions compriseinstructions for: determining that a depth image includes a target;repositioning at least a first joint if a distance between the firstjoint and a reference point is greater than a value until a position ofthe at least first joint is within a tolerance defined for the at leastfirst joint; and generating a model of the target based at least on therepositioned at least first joint.
 8. The device of claim 7, wherein theinstructions for determining that the depth image includes the targetcomprise instructions for: determining one or more edges associated witheach target in the scene; flood filling each target based on thedetermined one or more edges; and comparing each flood filled targetwith a pattern to determine whether each flood filled target matches thepattern.
 9. The device of claim 8, wherein the pattern includes amachine representation of a predetermined body model associated with ahuman.
 10. The device of claim 8, wherein the instructions for comparingeach flood filled target with a pattern to determine whether each floodfilled target matches the pattern further comprise instructions forcalculating a confidence value that indicates an accuracy to which eachof the flood filled target corresponds to the pattern.
 11. The device ofclaim 7, wherein the computer executable instructions further compriseinstructions for: scanning the target to locate the at least firstjoint; and identifying the reference point from the scan.
 12. The deviceof claim 11, wherein the instructions for scanning the target furthercomprise instructions for: removing an area of the depth image notmatching the target; creating a bitmask of the target; and scanning thebitmask to determine various body parts of the target.
 13. The device ofclaim 7, wherein the instructions for repositioning the at least firstjoint comprise instructions for: comparing a dY value with a dX valueassociated with the at least first joint, wherein the dY value and thedX value correspond to distances between the at least first joint and arespective reference point of the target; repositioning the at leastfirst joint in a first direction on a Y axis by the dX value if, basedon the comparison, the dY value may be greater than the dX value togenerate a first new shoulder joint; and repositioning the at leastfirst joint in a second direction on a X axis by the dY value if, basedon the comparison, the dY value may be less the dX value to generate asecond new shoulder joint.
 14. The device of claim 7, further comprisinginstructions for providing the model to a computing system, wherein thecomputing system tracks one or more movements of the model, and whereinthe computing system is controlled based on the tracked one or moremovements.
 15. A computer-readable storage device having stored thereoncomputer executable instructions for scanning a target in a capturedscene, the computer executable instructions comprising instructions for:receiving an image of the scene, the image including the target;comparing the target with a pattern to determine that the target matchesthe pattern; repositioning at least a first joint if a distance betweenthe at least first joint and a reference point is greater than a valueuntil a position of the at least first joint is within a tolerancedefined for the at least first joint; and generating a model of thetarget based at least on the repositioned at least first joint.
 16. Thecomputer-readable storage device of claim 15, wherein the patternincludes a machine representation of a predetermined body modelassociated with a human.
 17. The computer-readable storage device ofclaim 15, wherein the instructions for comparing the target with thepattern to determine that the target matches the pattern furthercomprise instructions for calculating a confidence value that indicatesan accuracy to which the target corresponds to the pattern.
 18. Thecomputer-readable storage device of claim 15, wherein the computerexecutable instructions further comprise instructions for: scanning thetarget to locate the at least first joint; and identifying the referencepoint from the scan.
 19. The computer-readable storage device of claim18, wherein the instructions for scanning the target further compriseinstructions for: removing an area of the image not matching the target;creating a bitmask of the target; and scanning the bitmask to determinevarious body parts of the target.
 20. The computer-readable storagedevice of claim 15, wherein the computer executable instructions furthercomprise instructions for providing the model to a computing system,wherein the computing system tracks one or more movements of the model,and wherein the computing system is controlled based on the tracked oneor more movements.